<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>SQL命令行工具</title>
<link type="text/css" rel="stylesheet" href="main.css"/>
<script src="jquery.js" language="javascript" type="text/javascript"></script>
<script src="base.js" language="javascript" type="text/javascript"></script>

</head>
<body>
<div class="mtitle">
  <div class="lbox">自定义属性管理</div>
</div>
<table class="tform">
  <tbody>
    <tr>
      <td></td>
      <td align="right"><b><a href="sys_data.php"><u>数据备份</u></a></b> 
            | <b><a href="sys_data_revert.php"><strong><u>数据还原</u></strong></a></b> </td>
    </tr>
  </tbody>
</table>
<table _dlist="line check" class="tlist" align="center">
<tbody>
<tr>
    <td height="200" bgcolor="#FFFFFF" valign="top">
	<table width="100%" border="0" cellspacing="4" cellpadding="2">
        <form action="sys_sql_query.php" method="post" name="infoform" target="stafrm">
          <input type='hidden' name='dopost' value='viewinfo' />
          <tr bgcolor="#F3FBEC"> 
            <td width="15%" height="24" align="center">系统的表信息：</td>
            <td> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td width="35%">
                  	<select name="tablename" id="tablename" style="width:100%" size="6">
                      <?php
$dsql->SetQuery("Show Tables");
$dsql->Execute('t');
while($row = $dsql->GetArray('t',MYSQL_BOTH))
{
	$dsql->SetQuery("Select count(*) From ".$row[0]);
	$dsql->Execute('n');
	$row2 = $dsql->GetArray('n',MYSQL_BOTH);
	$dd = $row2[0];
	echo "			<option value='".$row[0]."'>".$row[0]."(".$dd.")</option>\r\n";
}
?>
                    </select>
                  </td>
                  <td width="2%">&nbsp;</td>
<td width="63%" valign="bottom">

<div style="float:left;margin-right:20px;">
    <button type="submit" class="btn1" onClick="this.form.dopost.value='opimize';">优化选中表</button>
	<br />
    <button type="submit" class="btn1" onClick="this.form.dopost.value='repair';" style="margin-top:5px">修复选中表</button>
	<br />
    <button type="submit" class="btn1" onClick="this.form.dopost.value='viewinfo';" style="margin-top:5px">查看表结构</button>
</div>
<div style="float:left">
   <button type="submit" class="btn1" onClick="this.form.dopost.value='opimizeAll';">优化全部表</button>
	<br />
    <button type="submit" class="btn1" onClick="this.form.dopost.value='repairAll';" style="margin-top:5px">修复全部表</button>
</div>

</td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td height="200" align="center">返回信息：</td>
            <td>
			<iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe>
			</td>
          </tr>
		  </form>
		  <form action="sys_sql_query.php" method="post" name="form1" target="stafrm">
          <input type='hidden' name='dopost' value='query'>
          <tr> 
            <td height="24" colspan="2" bgcolor="#F3FBEC"><strong>运行SQL命令行： 
              <input name="querytype" type="radio" class="np" value="0">
              单行命令（支持简单查询） 
              <input name="querytype" type="radio" class="np" value="2" checked>
              多行命令</strong></td>
          </tr>
		      <tr> 
            <td height="118" colspan="2">
			<textarea name="sqlquery" cols="60" rows="10" id="sqlquery" style="width:90%"></textarea> 
            </td>
          </tr>
          <tr> 
            <td height="53" align="center">&nbsp;</td>
            <td>
            <button class="btn1" type="submit"> 确定 </button>
            	
            </td>
          </tr>
        </form>
      </table>
	 </td>
</tr>
</tbody>
</table>
</body>
</html>